package com.heima.feigns.user;

import com.heima.model.user.pojos.ApUser;
import com.heima.model.user.pojos.ApUserFollow;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author admin
 */
@FeignClient("leadnews-user")
public interface UserFeign {

    @GetMapping("/api/v1/user_follow/one")
    ApUserFollow findByUserIdAndFollowId(@RequestParam("userId") Integer userId, @RequestParam("followId") Integer followId);

    /**
     * @param id 用户id
     * @return 查询结果
     * @Description 根据id查询app端用户信息
     */
    @GetMapping("/api/v1/user/{id}")
    ApUser findUserById(@PathVariable("id") Long id);

}